<#include "/common/common.ftl">
<@html>
<link rel="stylesheet" href="${path}/js/dojo/dojox/grid/resources/${theme}Grid.css">
<script type="text/javascript">
	dojo.require("dijit.dijit");
	dojo.require("dojo.data.ItemFileReadStore");
	dojo.require("dojox.grid.DataGrid");
</script>
<div jsId="grid" dojoType="dojox.grid.DataGrid" selectionMode="single" store="store"
     rowsPerPage="10" structure="layout" autoHeight="true">
</div>
</@html>
<script type="text/javascript">
	var store = new dojo.data.ItemFileReadStore({
				data:{
					identifier:"id",
					label:"name",
					items:[
					<#list page.items as item>
						<#if (item_index > 0)>
							,<#rt>
						</#if>
							<#lt>{
							"id":"${(item.id)!}"
							,"userName":"${(item.userName)!}"
							,"logInTime":"${(item.logInTime)!}"
							,"clientIp":"${(item.clientIp)!}"
							,"state":"${(item.state)!}"
						}
					</#list>
					]
				}
			});

	var layout = [
		{
		},
		{
			cells : [
				[
					{
						name : "用户名称",
						field:"userName",
						headerClasses:"gridHeader",
						width : "10%"
					},
					{
						name : '登陆时间',
						field : 'logInTime',
						headerClasses:"gridHeader",
						width : "10%"
					},
					{
						name : '登陆IP',
						field : 'clientIp',
						headerClasses:"gridHeader",
						width : "10%"
					},
					{
						name : '状态',
						field : 'state',
						headerClasses:"gridHeader",
						width : "15%"
					}
				]
			]
		}
	];
</script>

